Reflecting on an Existing Programming Language
نویسندگان
چکیده
Reflection has proven to be a valuable asset for programming languages, especially object-oriented ones, by promoting adaptability and extensibility of programs. With more and more applications exceeding the boundary of a single address space, reflection comes in very handy for instance for performing conformance tests dynamically. The precise incentives and thus mechanisms for reflection vary strongly between its incarnations, depending on the semantics of the considered programming language, the architecture of its runtime environment, safety and security concerns, etc. Another strongly influential factor is legacy, i.e., the point in time at which the corresponding reflection mechanisms are added to the language. This parameter tends to dictate the feasible breadth of the features offered by an implementation of reflection. This paper describes a pragmatic approach to reflection, consisting in adding introspection to an existing object-oriented programming language a posteriori, i.e., without extending the programming language, compiler, or runtime environment in any specific manner. The approach consists in a pre-compiler generating specific code for types which are to be made introspectable, and an API through which this code is accessed. We present two variants of our approach, namely a homogeneous approach (for type systems with a universal root type) and a heterogeneous approach (without universal root type), and the corresponding generators. We discuss limitations such as infinite recursion, and compare the code generated with these two approaches by Erl-G, a reflection library generator for the Eiffel programming language, thereby quantifying the benefits of a universal root type. Erl-G is being used by several tools for development in Eiffel.
منابع مشابه
A Data Envelopment Analysis Model with Triangular Intuitionistic Fuzzy Numbers
DEA (Data Envelopment Analysis) is a technique for evaluating the relative effectiveness of decision-making units (DMU) with multiple inputs and outputs data based on non-parametric modeling using mathematical programming (including linear programming, multi-parameter programming, stochastic programming, etc.). The classical DEA methods are developed to handle the information in the form of cri...
متن کاملAn iterative method for tri-level quadratic fractional programming problems using fuzzy goal programming approach
Tri-level optimization problems are optimization problems with three nested hierarchical structures, where in most cases conflicting objectives are set at each level of hierarchy. Such problems are common in management, engineering designs and in decision making situations in general, and are known to be strongly NP-hard. Existing solution methods lack universality in solving these types of pro...
متن کاملAn interval-valued programming approach to matrix games with payoffs of triangular intuitionistic fuzzy numbers
The purpose of this paper is to develop a methodology for solving a new type of matrix games in which payoffs are expressed with triangular intuitionistic fuzzy numbers (TIFNs). In this methodology, the concept of solutions for matrix games with payoffs of TIFNs is introduced. A pair of auxiliary intuitionistic fuzzy programming models for players are established to determine optimal strategies...
متن کاملSome new results on semi fully fuzzy linear programming problems
There are two interesting methods, in the literature, for solving fuzzy linear programming problems in which the elements of coefficient matrix of the constraints are represented by real numbers and rest of the parameters are represented by symmetric trapezoidal fuzzy numbers. The first method, named as fuzzy primal simplex method, assumes an initial primal basic feasible solution is at hand. T...
متن کاملAn Integrated Approach of Fuzzy Quality Function Deployment and Fuzzy Multi-Objective Programming Tosustainable Supplier Selection and Order Allocation
The emergence of sustainability paradigm has influenced many research disciplines including supply chain management. It has drawn the attention of manufacturing companies’ CEOs to incorporate sustainability in their supply chain and manufacturing activities. Supplier selection problem, as one of the main problems in supply chain activities, is also combined with sustainable development where tr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Object Technology
دوره 6 شماره
صفحات -
تاریخ انتشار 2007